package bishi2016;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Qunar_FindCoder {


	public static void main(String[] args) {
		String string = new String("ccdecccdeccddcd");
//		System.out.println(string.matches("ccde"));
		Pattern pattern = Pattern.compile("c[2,2]d[1,1]e[1,1]");
		Matcher matcher = pattern.matcher(string);
		if(matcher.matches()){
			System.out.println(matcher.group());
		}
//		System.out.println(string.lastIndexOf("ccde"));
		System.out.println(string.indexOf("ccde"));
	}
	
}
